package app.poller.entities;

import android.os.Parcel;
import android.os.Parcelable;

public class Contact implements Parcelable{
	
	private String contactName;
	private String contactPhoneNumber;
	
	public Contact(Parcel in) {
		contactName = in.readString();
		contactPhoneNumber = in.readString();
	}
	
	public Contact(String name, String number) {
		contactName = name;
		contactPhoneNumber = number;
	}
	
	public String getContactName() {
		return contactName;
	}
	
	public void setContactName(String contactName) {
		this.contactName = contactName;
	}
	
	public String getContactPhoneNumber() {
		return contactPhoneNumber;
	}
	
	public void setContactPhoneNumber(String contactPhoneNumber) {
		this.contactPhoneNumber = contactPhoneNumber;
	}
	
	@Override
	public String toString() {
		return contactName;
	}

	public int describeContents() {
		return hashCode();
	}

	public void writeToParcel(Parcel dest, int arg1) {
		dest.writeString(contactName);
		dest.writeString(contactPhoneNumber);
	}
	
	public static final Parcelable.Creator<Contact> CREATOR =  new Parcelable.Creator<Contact>() {

		public Contact createFromParcel(Parcel source) {
			return new Contact(source);
		}

		public Contact[] newArray(int size) {
			return new Contact[size];
		}
	};
}
